package cn.ift8.dao.impl;

import cn.ift8.dao.CustomerDao;
import cn.ift8.domain.Customer;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import java.util.List;

/**
 * Created by IFT8
 * on 2015/8/24.
 */
public class CustomerDaoImp extends HibernateDaoSupport implements CustomerDao {

    @Override
    public void del(Customer customer) {
        getHibernateTemplate().delete(customer);
    }

    @Override
    public void save(Customer customer) {
        getHibernateTemplate().saveOrUpdate(customer);
    }

    @Override
    public Customer getById(Long id) {
        return getHibernateTemplate().load(Customer.class, id);
    }

    @Override
    public List<Customer> getCustomers() {
        return null;
    }
}
